﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MotaWeb.Models.Interfaces;
using MotaWeb.Models;

namespace MotaWeb.Tests.MockSupport
{
    public class MockRepository : IMotaWebRepository
    {
        #region IMotaWebRepository Members

        public IQueryable<MotaWeb.Models.Quote> FindAllQuotes()
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.Quote FindQuote(DateTime forDate)
        {
            throw new NotImplementedException();
        }

        public IQueryable<MotaWeb.Models.Announcement> FindAllAnnouncements()
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.Announcement FindAnnouncement(DateTime forDate)
        {
            return GetCurrentMockAnnouncement();
        }

        public MotaWeb.Models.Announcement FindAnnouncement(int id)
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.Announcement CreateAnnouncement(string message, DateTime effectiveDate, DateTime expirationDate)
        {
            throw new NotImplementedException();
        }

        public void EditAnnouncement(int id, string message, DateTime effectiveDate, DateTime expirationDate)
        {
            throw new NotImplementedException();
        }

        public void DeleteAnnouncement(int id)
        {
            throw new NotImplementedException();
        }

        public IQueryable<MotaWeb.Models.Biography> FindBiographies()
        {
            throw new NotImplementedException();
        }

        public IQueryable<MotaWeb.Models.Biography> FindBiographies(bool isApproved)
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.Biography FindBiography(int id)
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.Biography FindBiography(string userName)
        {
            throw new NotImplementedException();
        }

        public IQueryable<MotaWeb.Models.Biography> FindPendingBiographies()
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.Biography CreateBiography(string biographyText, string userName, bool isApproved)
        {
            throw new NotImplementedException();
        }

        public void EditBiography(int id, string biographyText, bool isApproved)
        {
            throw new NotImplementedException();
        }

        public void DeleteBiography(int id)
        {
            throw new NotImplementedException();
        }

        public ISiteUser SiteUserFromMembershipUser(System.Web.Security.MembershipUser user)
        {
            throw new NotImplementedException();
        }

        public void UpdateSiteUser(ISiteUser userToUpdate)
        {
            throw new NotImplementedException();
        }

        public MotaWeb.Models.SiteUser CreateSiteUser(string firstName, string lastName, Guid providerUserKey)
        {
            var u = new SiteUser()
            {
                FirstName = firstName,
                LastName = lastName,
                ProviderUserKey = providerUserKey
            };
            return u;
        }

        public void Save()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region Helpers
        private Announcement GetCurrentMockAnnouncement()
        {
            var a = new Announcement();
            a.EffectiveDate = DateTime.Now.AddDays(-1);
            a.ExpirationDate = DateTime.Now.AddDays(1);
            a.Message = "A current announcement";
            a.Id = 1;
            return a;
        }
        #endregion
    }
}
